//
// Created by REEJI2219 on 2024-08-09.
//

#ifndef SLINKLIST_H
#define SLINKLIST_H
#include "linkList.h"
typedef int ElemType;
class SNode {
public:
    ElemType data;
    int nextCur;
    SNode();
    ~SNode();
};
class SLinkList {
private:
    int maxSize;
    int length;
    int headCur;
    SNode *array;
    LinkList *linkList;
public:
    SLinkList();
    ~SLinkList();
    bool append(ElemType data);
    // bool add(int i,ElemType data);
    bool remove(int i,ElemType *data);
    bool find(ElemType data,int *position);
    bool uniList(SLinkList *other,SLinkList *result);
    void printList();
    bool appendList(SLinkList *other);
};
#endif //SLINKLIST_H
